<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.8/vue.min.js"></script>
    <script src="https://cdn.bootcss.com/axios/0.19.0-beta.1/axios.js"></script>
</head>
<body>
<div id="app">
    <div>you login</div>
    <div>{{message}}</div>
    <button @click="logout">退出</button>
</div>

</body>
</html>

<script>
    new Vue({
        el: '#app',
        data: {
            message: 'Hello Vue.js!'
        },
        methods: {
            logout: function () {
                console.log('logout')
                axios.post("../logout").then(function (res) {
                    console.log(res);
                })
            }
        }
    })
</script>